C-Level Extensibility > The C-level extensibility API > JSBool JS_SetElement() |
![]() ![]() ![]() |
Description
Writes a single element of an array object.
Arguments
JSContext
*cx,
JSObject
*obj,
unsigned int
index,
jsval
*v
![]() |
cx is the opaque JSContext pointer that was passed to the JavaScript function. |
![]() |
obj is a pointer to an array object. |
![]() |
index is an integer index into the array. The first element is index 0 , and the last element is index (length - 1 ). |
![]() |
v is a pointer to a jsval whose contents should be copied to the jsval in the array. |
Returns
A Boolean value indicating success (JS_TRUE
) or failure (JS_FALSE
).
![]() ![]() ![]() |